package com.cap6.config;

import com.cap6.bean.Monkey;
import org.springframework.beans.factory.FactoryBean;

public class JamesFactoryBean implements FactoryBean<Monkey> {

    @Override
    public Monkey getObject() throws Exception {
        return new Monkey();
    }

    @Override
    public Class<?> getObjectType() {
        return Monkey.class;
    }

    /**
     * bean的实例模式
     * true     唯一
     * false    不唯一
     * @return
     */
    @Override
    public boolean isSingleton() {
        return false;
    }
}
